package cn.itcast.bos.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import cn.itcast.bos.domain.base.Courier;
/**
 * 
 *实现带条件的分页查询,需要继承jpaSpeficicationExecutor
 */
@Repository
public interface CourierRepository extends JpaRepository<Courier, Integer>,JpaSpecificationExecutor<Courier> {

	
	@Query(value="update Courier set deltag = '1' where id = ?")
	@Modifying
	public void typeDel(Integer id);
	@Query(value="update Courier set deltag = null where id = ?")
	@Modifying
	public void typeAdd(Integer id);

}
